import { lazy } from "react";

const routerList = [
  {
    path: "/",
    element: lazy(() => import("../pages/home")),
    title: "首页",
    tokens: true,
    children: [
      {
        path: "/home/articlechearch",
        element: lazy(() => import("../pages/home/articlechearch")),
        title: "文章",
        tokens: true,
      },
      {
        path: "/home/doctorchearch",
        element: lazy(() => import("../pages/home/doctorchearch")),
        title: "所有医生",
        tokens: true,
      },
      {
        path: "/manage/addarticle",
        element: lazy(() => import("../pages/manage/addarticle")),
        title: "新增文章",
        tokens: true,
      },
      {
        path: "/manage/article",
        element: lazy(() => import("../pages/manage/article")),
        title: "文章管理",
        tokens: true,
      },
      {
        path: "/manage/doctor",
        element: lazy(() => import("../pages/manage/doctor")),
        title: "医生管理",
        tokens: true,
      },
      {
        path: "/review/article",
        element: lazy(() => import("../pages/review/article")),
        title: "文章审核",
        tokens: true,
      },
      {
        path: "/review/doctor",
        element: lazy(() => import("../pages/review/doctor")),
        title: "医生审核",
        tokens: true,
      },
    ],
  },
  { path: "/login", element: lazy(() => import("../pages/login/login")) },
  { path: "/*", element: lazy(() => import("../pages/login/error")) },
];
export default routerList;
